<div class="content">
    <?php
    $this->widget('zii.widgets.grid.CGridView', array(
        'id' => 'product-grid',
        'dataProvider' => $model->search(),
        //'filter' => $model,
        'cssFile' => false,
        //'cssFile'=>Yii::app()->request->baseUrl.'/css/table.css',
        'summaryText' => false,
        'itemsCssClass' => 'LTable',
        'columns' => array(
            array(
                'name' => 'id',
                'value' => $data->id,
                'htmlOptions' => array(
                    'width' => '5%'
                )
            ),
            array(
                'name' => 'name',
                'type' => 'raw',
                'value' => 'CHtml::link(CHtml::encode($data->name), $data->url, array("target" => "_blank"))',
                'htmlOptions' => array(
                    'width' => '25%',
                ),
            ),
            array(
                'name' => 'category_id',
                'value' => '$data->category->name',
                'filter' => ProductCategory::model()->getCategories(),
                'htmlOptions' => array(
                    'width' => '15%',
                )
            ),
            'model',
            'producer',
            'number',
            'specification',
            array(
                'class' => 'CButtonColumn',
                'header' => '操作',
                'viewButtonUrl' => '$data->url',
                'viewButtonOptions' => array('target' => '_blank'),
            ),
        ),
    ));
    ?>
</div>
<div class="sidebar">
    <?php echo $this->renderPartial('_operations'); ?>
</div>
